<template>
  <div>
    <div class="category">
      <h3>{{needData.title}}分类</h3>
      <slot>
      </slot>
    </div>
  </div>
</template>

<script>
export default {
  name: 'category',
  props: ['needData']
}
</script>

<style lang="css" scoped>
* {
  padding: 0;
  margin: 0;
}
.category {
  width: 200px;
  height: 300px;
  background-color: skyblue;
  overflow: hidden;
}
h3 {
  background-color: orange;
  text-align: center;
  margin-top: 30px;
}
ul {
  padding-top: 20px;
}
ul li {
  padding: 5px 20px;
}
</style>